
program hello
    implicit none
    real  x, y
    print *, 'input x between 0 and 30'
    read(*, *)  x
    if ((x .GT. 0 .OR. x .EQ. 0) .AND. x .LT. 10) then
        y=x
    else if ((x .GT. 10 .OR. x .EQ. 10) .AND. x .LT. 20) then
        y=x**2+1
    else
        y=x**3+x**2+1
    end if
    print *, 'y=', y

end program

